package cn.tqfeiyang.smartadmin.business.organization.request;

import java.time.LocalDateTime;
import cn.tqfeiyang.smartadmin.commons.validation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

import java.io.Serializable;

/**
 * 员工添加请求
 *
 * @author tqfeiyang
 * @since 2024-10-18
 */
@Data
public class EmployeeCreateDTO implements Serializable {

    /**
     * 名称
     */
    @Schema(description = "名称")
    @NotBlank(message = "名称不能为空")
    @Size(max = 50, message = "名称不能超过50字符")
    private String name;

    /**
     * 登录账号
     */
    @Schema(description = "登录账号")
    @Size(max = 50, message = "登录账号不能超过50字符")
    private String loginName;

    /**
     * 密码
     */
    @Schema(description = "密码")
    @Size(max = 100, message = "密码不能超过100字符")
    private String password;

    /**
     * 盐值
     */
    @Schema(description = "盐值")
    @Size(max = 10, message = "盐值不能超过10字符")
    private String salt;

    /**
     * 昵称
     */
    @Schema(description = "昵称")
    @Size(max = 50, message = "昵称不能超过50字符")
    private String nickName;

    /**
     * 电子邮件
     */
    @Schema(description = "电子邮件")
    @Size(max = 50, message = "电子邮件不能超过50字符")
    @IsEmail(message = "电子邮件不是正确的邮箱地址")
    private String email;

    /**
     * 电话
     */
    @Schema(description = "电话")
    @Size(max = 50, message = "电话不能超过50字符")
    @IsMobile(message = "电话不是正确的手机号码")
    private String phone;

    /**
     * 是否可用？
     */
    @Schema(description = "是否可用？")
    private Boolean status;

    /**
     * 部门id
     */
    @Schema(description = "部门id")
    private Long departmentId;

    /**
     * 是否管理员？
     */
    @Schema(description = "是否管理员？")
    private Boolean admin;

    /**
     * 备注
     */
    @Schema(description = "备注")
    @Size(max = 200, message = "备注不能超过200字符")
    private String remark;
}